package org.toools.gwt.wmc.client.account;

import com.google.gwt.user.client.rpc.AsyncCallback;
import java.util.Collection;
import org.toools.gwt.widget.client.bc.TooolsServiceAsync;
import org.toools.gwt.wmc.jpa.Account;

public interface AccountServiceAsync extends TooolsServiceAsync {

    void login(String email, String pwd, AsyncCallback<Integer> callback);
    void logout(AsyncCallback<Boolean> callback);
    void register(String email, String pwd, AsyncCallback<Integer> callback);

    //TODO ev. rausnehmen
    void getAccountByID(Integer id, AsyncCallback<Account> callback);
    void getAccounts(AsyncCallback<Collection<Account>> callback);

    void update( Account a, AsyncCallback<Boolean> callback );
    void delete( Account a, AsyncCallback<Boolean> callback );
}